#include<stdio.h>
#include<string.h>

int fun(char c[])
{
	int sign,sum=0;
	int k=strlen(c);
	for(sign=0;sign<k;sign++)
	{
		if(c[sign]>='A'&&c[sign]<='Z') sum++;
		if(c[sign]>='a'&&c[sign]<='z') sum++;
	}
	return sum;
}
int main()
{
	char c[100];
	gets(c);
	printf("%d",fun(c));
	return 0;
}
